#!/usr/bin/python
# -*- coding: UTF-8 -*-
import tkinter

from utils.WindowUtils import WindowUtils

class BaseMainWindow(tkinter.Tk):
    def __init__(self,width=500,height=300,title=None):
        super(BaseMainWindow, self).__init__()
        WindowUtils.center_window(self, width, height)
        self.maxsize(width, height)
        self.minsize(width, height)
        self.title(title)

    def getWidth(self):
        self.update()
        return self.winfo_width()

    def getHeight(self):
        self.update()
        return self.winfo_height()

    def show(self):
        self.mainloop()